<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <title>税票贷</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/shuipiaopp.css">
</head>

<body>
    <div class="AppMain">
        <div class="accurate-match">
            <!-- 头部标题模块 -->
            <div class="herder flx">
                <div class="header-title flx">
                    <!-- 文字标题和图片标题  二选一-->
                    <h3>税票贷</h3>
                    <!-- <h3><img src="images/sq.png" alt=""></h3> -->
                    <div class="credit_list flx">
                        <span>税局开通情况</span>
                        <img src="images/rsj.png" alt="">
                    </div>
                </div>
                <div class="header-step">
                    <div class="step-top flx">
                        <div class="step1 flx">
                            <i>1</i>
                            <span class="font">智能采集</span>
                            <div class="line"></div>
                        </div>
                        <div class="step1 flx">
                            <i>2</i>
                            <span class="font">智能匹配</span>
                            <div class="line"></div>
                        </div>
                        <div class="step1 flx">
                            <i>✔</i>
                            <span class="font">智能进件</span>

                        </div>
                    </div>
                </div>
            </div>
            <div class="accurate-match-main">
                <div class="menu-top">
                    <font>*</font>
                    请您填写信息
                </div>
                <iframe name="hidden" style="display:none;"></iframe>
                <form action="" method="" id="myform" target="hidden">
                    <input type="text" name="quyu" autofocus="autofocus" placeholder="请输入您所在区域（必填）">
                    <input type="text" class="gsname" name="mingcheng" placeholder="请输入您的公司名称（必填）">
                    <input type="text" name="time" placeholder="请输入您公司的成立时间（必填）">
                    <input type="text" class="shui" name="nsje" placeholder="请输入您公司近三年纳税金额/万（必填）">
                    <button type="submit" id="open-toast" class="btn">查看可贷金额</button>
                </form>
            </div>

        </div>
    </div>
    <!-- input内容填写不全弹窗内容 -->
    <span class="toast" style="display: none;background-color: #7f7f7f;border-radius: 0.4rem;padding: .8rem 1rem;position: fixed;left: 50%;top: 34%;transform: translate(-50%, -50%);border: none;opacity: 0.9;color: #dadada;text-align: center;">
        内容填写不完整</span>
    <script src=" js/flexible.js"></script>

    <script>
        var action = document.getElementById('myform');
        var com = action.getElementsByTagName('input');
        var btn = document.querySelector('.btn');
        var shui = document.querySelector('.shui');
        var gsname = document.querySelector('.gsname');
        btn.addEventListener('click', function() {
            var valone = shui.value;
            localStorage.setItem('usershui', parseInt(valone));
            var valtwo = gsname.value;
            localStorage.setItem('username', valtwo);
        })



        for (var i = 0; i < com.length; i++) {
            com[i].onmousemove = function() {
                for (var i = 0; i < com.length; i++) {
                    if (com[i].value.length == 0) {
                        btn.className = 'btn';
                        //信息不全弹窗
                        btn.onclick = function() {
                                document.querySelector('.toast').style.display = '';
                                // // 2 s后自动关闭
                                setTimeout(() => {
                                    document.querySelector('.toast').style.display = 'none';
                                }, 2000);

                            }
                            //不退出循环，最后一个输入框填写时会进行下一步
                        break;
                    } else {
                        btn.className = 'btn pink';
                        //输入完信息跳转的地址
                        btn.onclick = function() {
                            document.location.href = 'ppxq.html?timestamp=' + Math.random();
                        }
                    }
                }
            }
        }
    </script>
</body>


</html>